//
//  UIViewController+CYGEx.m
//  CYGHuntForCity
//
//  Created by cygarm on 16/3/6.
//  Copyright © 2016年 cygarm. All rights reserved.
//

#import "UIViewController+CYGEx.h"

@implementation UIViewController (CYGEx)

- (UIViewController *)cyg_backViewController
{
	NSInteger numberOfViewControllers = self.navigationController.viewControllers.count;
	
	if (numberOfViewControllers < 2)
		return nil;
	else
		return [self.navigationController.viewControllers objectAtIndex:numberOfViewControllers - 2];
}

@end
